<template>
<el-row class="tac">
     <el-col :span="12">
    <el-menu
      default-active="2"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>
           <span>导航</span>
          </span>
        </template>
        <el-menu-item-group>
          <el-menu-item index="1-1">
            <router-link to="/">首页</router-link>
            </el-menu-item>
          <el-menu-item index="1-2">
             <router-link to="/foodsson">食品</router-link>
            </el-menu-item>
        </el-menu-item-group>
          <el-menu-item index="1-3">
             <router-link to="/showsson"> 展示</router-link>
           </el-menu-item>
        <el-submenu index="1-4">
          <template slot="title">
             <router-link to="/myson">我的</router-link>
            </template>
          <el-menu-item index="1-4-1">
             <router-link to="/lists">清单</router-link>
            </el-menu-item>
        </el-submenu>
      </el-submenu>
      <el-menu-item index="2">
        <i class="el-icon-menu"></i>
        <span slot="title">导航二</span>
      </el-menu-item>
      <el-menu-item index="4">
        <i class="el-icon-setting"></i>
        <span slot="title">导航四</span>
      </el-menu-item>
    </el-menu>
  </el-col>
</el-row>
</template>
<script>
export default {
  name:'Asides',
   methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    }
}
</script>
<style lang="less">
 a {
    font-weight: bold;
    color: #010911;
    text-decoration: none;
    &.router-link-exact-active {
      color: #e8eeeb;
    }
  }
  .tac{
    widows: 200px;
    height: 500px;
    margin: 0 auto;
    overflow: hidden;
      .el-col, .el-clo-12{
     width: 210px;
    height: 400px;
    
  }
  }
  
</style>